import { defineStore } from "pinia"

interface memberReturn {
    memberList: Array<any>
}

const memberStore = defineStore("member", {
    state(): memberReturn {
        return {
            memberList: []
        }
    },
    persist: {
        enabled: true, // 开启持久化保存
    },
    actions: {
        setList(data: any) {
            this.memberList = [...data]
            // console.log("加入数据", this.memberList)
        }
    },
    getters: {
        getList(): any {
            return [...this.memberList]
        }
    }
})


export default memberStore;